class OtherUserInfoResponse {
  int? customerId;
  String? nickName;
  String? avatar;
  String? cover;
  String? intro;
  String? uniqueNo;
  int followFlag;
  int fansNum;
  int followNum;
  int receiveNum;
  int officialFlag;
  String? officialName;

  OtherUserInfoResponse({
    this.customerId,
    this.nickName,
    this.avatar,
    this.cover,
    this.intro,
    this.uniqueNo,
    this.followFlag = 0,
    this.fansNum = 0,
    this.followNum = 0,
    this.receiveNum = 0,
    this.officialFlag = 0,
    this.officialName,
  });

  factory OtherUserInfoResponse.fromJson(Map<String, dynamic> json) =>
      OtherUserInfoResponse(
        customerId: json['customerId'] as int?,
        nickName: json['nickName'] as String?,
        avatar: json['avatar'] as String?,
        cover: json['cover'] as String?,
        intro: json['intro'] as String?,
        uniqueNo: json['uniqueNo'] as String?,
        fansNum: json['fansNum'] as int,
        followNum: json['followNum'] as int,
        receiveNum: json['receiveNum'] as int,
        followFlag: (json['followFlag'] as int?) ?? 0,
        officialFlag: (json['officialFlag'] as int?) ?? 0,
        officialName: json['officialName'] as String?,
      );

  Map<String, dynamic> toJson() => {
        'customerId': customerId,
        'nickName': nickName,
        'avatar': avatar,
        'cover': cover,
        'intro': intro,
        'uniqueNo': uniqueNo,
        'followFlag': followFlag,
        'fansNum': fansNum,
        'followNum': followNum,
        'receiveNum': receiveNum,
        'officialFlag': officialFlag,
        'officialName': officialName,
      };
}
